package com.zy.nft_system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 用户藏品信息表
 * @TableName t_userantique
 */
@TableName(value ="t_userantique")
@Data
public class Userantique implements Serializable {
    /**
     * 主键无啥作用
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 藏品名字
     */
    private String name;

    /**
     * 藏品编号
     */
    private Integer number;

    /**
     * 入库价格
     */
    private Integer purchaseprice;

    /**
     * 出库价格
     */
    private Integer sellprice;

    /**
     * 用户藏品的状态 0表示锁定中 1表示在仓库，2表示出售
     */
    private Integer status;

    /**
     * 藏品图的地址
     */
    private String imgsrc;

    /**
     * 藏品入库时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime;

    /**
     * 藏品信息修改时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date modiftime;

    /**
     * 用户id
     */
    private Integer uid;

    /**
     * 藏品id
     */
    private Integer aid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Userantique other = (Userantique) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
            && (this.getPurchaseprice() == null ? other.getPurchaseprice() == null : this.getPurchaseprice().equals(other.getPurchaseprice()))
            && (this.getSellprice() == null ? other.getSellprice() == null : this.getSellprice().equals(other.getSellprice()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getImgsrc() == null ? other.getImgsrc() == null : this.getImgsrc().equals(other.getImgsrc()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getModiftime() == null ? other.getModiftime() == null : this.getModiftime().equals(other.getModiftime()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getPurchaseprice() == null) ? 0 : getPurchaseprice().hashCode());
        result = prime * result + ((getSellprice() == null) ? 0 : getSellprice().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getImgsrc() == null) ? 0 : getImgsrc().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getModiftime() == null) ? 0 : getModiftime().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", number=").append(number);
        sb.append(", purchaseprice=").append(purchaseprice);
        sb.append(", sellprice=").append(sellprice);
        sb.append(", status=").append(status);
        sb.append(", imgsrc=").append(imgsrc);
        sb.append(", createtime=").append(createtime);
        sb.append(", modiftime=").append(modiftime);
        sb.append(", uid=").append(uid);
        sb.append(", aid=").append(aid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}